package lsy.redis001.lsyredis001.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Article{
    private Long id;
    private String title;
    private String author;
//    private LocalDateTime updateTime;
    private String img;
    private String summary;
    // 文章内容
    private String content;

    private List<String> tags;

    public static Set<String> initKey(){
        HashSet<String> set = new HashSet<>();
        set.add("title");
        set.add("author");
//        set.add("updateTime");
        set.add("img");
        set.add("summary");
        set.add("content");
        return set;
    }
}
